<layout name="../../../Resource/master"/>
<ul class="breadcrumb no-border no-radius b-b b-light pull-in">
    <li><a href="index.html"><i class="fa fa-home"></i> Home</a></li>
    <li><a href="#">商品管理</a></li>
    <li><a href="#">商品添加</a></li>
</ul>
<div class="m-b-md">
    <h3 class="m-b-none">商品列表</h3>
</div>
<section class="panel panel-default">
    <header class="panel-heading font-bold">商品列表</header>
    <div class="panel-body">
        <div class="container-fluid">
            <div class="row-fluid">
                <div class="span12">

                    <table class="table table-bordered table-hover">
                        <tr>
                            <th>ID</th>
                            <th>商品名称</th>
                            <th>价格</th>
                            <th>库存</th>
                            <th>点击次数</th>
                            <th>添加时间</th>
                            <th>操作</th>
                        </tr>

                        <foreach name='list' item='v'>
                            <tr class="info">
                                <td>{$v.gid}</td>
                                <td>
                                    <a href="" target='_blank'>{$v.gname}</a>
                                </td>
                                <td>
                                    <ul>
                                        <li>市场价：<del>&yen;{$v.marketprice}</del></li>
                                        <li>商城价：<span>&yen;{$v.shopprice}</span></li>
                                    </ul>
                                </td>
                                <td>
                                    {$v.stocks}
                                </td>
                                <td>{$v.click}</td>
                                <td>{$v.time|date='Y-m-d H:i:s', ###}</td>
                                <td style="min-width: 250px">
                                    <a href="{:U('GoodsLists/index', ['gid' => $v['gid'], 'tid' => $v['tid']])}" class="btn btn-success"><i class="icon-th icon-white"></i>货品列表</a>
                                    <a href="{:U('Goods/edit', ['gid' => $v['gid']])}" class="btn btn-warning"><i class="icon-pencil icon-white"></i>修改</a>
                                    <a href="{:U('Goods/del', ['gid' => $v['gid']])}" class="btn btn-danger"><i class="icon-trash icon-white"></i>删除</a>
                                </td>
                            </tr>
                        </foreach>
                    </table>

                    <!--分页样式书写-->
                    <style>
                        /*其他页、上一页、下一页样式*/
                        .pagination .num,.prev,.next{
                            position: relative;
                            float: left;
                            padding: 6px 12px;
                            margin-left: -1px;
                            line-height: 1.42857143;
                            color: #337ab7;
                            text-decoration: none;
                            background-color: #fff;
                            border: 1px solid #ddd
                        }
                        /*当前分页样式*/
                        .pagination .current{
                            position: relative;
                            float: left;
                            padding: 6px 12px;
                            margin-left: -1px;
                            line-height: 1.42857143;
                            color: red;
                            text-decoration: none;
                            background-color: #fff;
                            border: 1px solid #ddd
                        }
                        .pagination .headerPage{
                            position: relative;
                            float: left;
                            padding: 6px 12px;
                            text-decoration: none;
                            background-color: #fff;

                        }
                    </style>
                    <!--分页样式结束-->
                    <!--展示分页-->
                    <div class="col-sm-12 text-right text-center-xs">
                        <ul class="pagination pagination-sm m-t-none m-b-none">
                            {$page}
                        </ul>
                    </div>

                </div>
            </div>
        </div>
    </div>
</section>


